home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / libray / libobj / csg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-09  |  1.4 KB  |  56 lines

  1. /*
  2.  * csg.h
  3.  *
  4.  * Copyright (C) 1989, 1991, Craig E. Kolb
  5.  * All rights reserved.
  6.  *
  7.  * This software may be freely copied, modified, and redistributed
  8.  * provided that this copyright notice is preserved on all copies.
  9.  *
  10.  * You may not distribute this software, in whole or in part, as part of
  11.  * any commercial product without the express consent of the authors.
  12.  *
  13.  * There is no warranty or other guarantee of fitness of this software
  14.  * for any purpose.  It is provided solely "as is".
  15.  *
  16.  * csg.h,v 4.1 1994/08/09 07:58:22 explorer Exp
  17.  *
  18.  * csg.h,v
  19.  * Revision 4.1  1994/08/09  07:58:22  explorer
  20.  * Bump version to 4.1
  21.  *
  22.  * Revision 1.1.1.1  1994/08/08  04:52:08  explorer
  23.  * Initial import.  This is a prerelease of 4.0.6enh3, or 4.1 possibly.
  24.  *
  25.  * Revision 4.0  91/07/17  14:37:06  kolb
  26.  * Initial version.
  27.  * 
  28.  */
  29. #ifndef CSG_H
  30. #define CSG_H
  31.  
  32. #define GeomCsgCreate(t)    GeomCreate((GeomRef)CsgCreate(t), CsgMethods())
  33.  
  34. /*
  35.  * CSG (Constructive Solid Geometry)
  36.  */
  37. #define CSG_UNION    0
  38. #define CSG_INTERSECT    1
  39. #define CSG_DIFFERENCE    2
  40.  
  41. typedef struct Csg {
  42.     char operator;            /* Union, Intersect, or Difference */
  43.     struct Geom *obj1, *obj2;
  44.     int (*intmeth)();        /* Intersection method. */
  45.     Float bounds[2][3];
  46. } Csg;
  47.  
  48. extern char    *CsgName();
  49. extern Csg    *CsgCreate();
  50. extern int    CsgIntersect(), CsgConvert();
  51. extern void    CsgBounds();
  52. extern int    FirstCsgGeom();
  53. extern Methods    *CsgMethods();
  54.  
  55. #endif /* CSG_H */
  56.